Up to now, there have been image processing techniques for recognizing a pattern in a captured image. For example, there have been image processing apparatuses for recognizing a pattern of a two-dimensional bar code.
Further, in the case where the display direction of a display device on which a captured image is displayed is the same as the image capturing direction of a camera (the eye direction of a user is opposite to the image capturing direction of the camera), it is common practice to left-right reverse the captured image and display the reversed captured image on the display device.
If such a reversed captured image is used, it is unfortunately difficult to compare the captured image with an image for detection to detect a feature in the captured image.
The present disclosure provides a computer-readable recording medium that records therein a program for image processing causing a computer to function as: a captured image acquiring unit that acquires an image captured by an imaging device; a display controlling unit that displays an image including the captured image on a display device; and a feature detecting unit that detects, from the captured image, a feature in a real space captured in the captured image, using an image for detection of the feature. In a case where the captured image acquired by the captured image acquiring unit is a reversed image, the feature detecting unit performs a reverse comparison process to thereby detect the feature, the reverse comparison process involving: comparing the captured image with a reversed image of the image for detection; or comparing an image obtained by further reversing the captured image, with the image for detection.
Here, the display device may be connected as peripheral equipment to the computer that executes the program according to the present disclosure, and may be connected thereto via a communication network or the like. Further, the computer that fulfils a main role in executing the program according to the present disclosure may be constructed in a virtual environment such as so-called cloud computing.
Further, the feature in the real space refers to a marker for a so-called augmented reality (AR) process or a code such as a two-dimensional bar code, for example. Then, such a feature may be put onto a component such as a card, for example. Further, such a feature is not limitatively used for the AR process, and is not limited to a dedicated marker, a dedicated code, and the like. Even articles used for other purposes can be used as the feature as long as the display reference of the virtual object can be acquired therefrom.
Further, in a case where an image capturing direction of the imaging device is substantially the same as a display direction of the display device, the feature detecting unit may determine that the captured image is a reversed image, and may perform the reverse comparison process to thereby detect the feature. In a case where the imaging device used for the acquisition of the captured image is an imaging device set on a display surface side of the display device, the feature detecting unit may determine that the captured image is a reversed image, and may perform the reverse comparison process to thereby detect the feature.
This is because the captured image can be determined to be reversed, in a case where the imaging device and the display device have such relations as described above.
Further, in a case where the image capturing direction of the imaging device is substantially opposite to the display direction of the display device, the feature detecting unit may determine that the captured image is not a reversed image, and may compare the captured image with the image for detection to thereby detect the feature. In a case where the imaging device used for the acquisition of the captured image is an imaging device set on an opposite side to a display surface of the display device, the feature detecting unit may determine that the captured image is not a reversed image, and may compare the captured image with the image for detection to thereby detect the feature.
This is because the captured image can be determined not to be reversed, in a case where the imaging device and the display device have such relations as described above.
Further, the program for image processing may further cause the computer to function as: a holding unit that holds the image for detection; and a reversed image-for-detection generating unit that reverses the image for detection held by the holding unit, to thereby generate the reversed image of the image for detection.
Further, the program for image processing may further cause the computer to function as: a reference information acquiring unit that acquires display reference information used as a reference of at least any of a position and a posture in a virtual space, of a virtual object placed in the virtual space, based on the feature; and an image generating unit that generates an image of the virtual space including the virtual object placed in accordance with the display reference information. The display controlling unit may display, on the display device, a composite image in which the image of the virtual space is superimposed on the captured image.
The display reference information is, for example, a reference indicating at least any of a position and a posture in a captured space. The display reference information may be, for example, a coordinate system the origin and three axes of which are determined in accordance with the position and posture of a marker, or may be, for example, position posture information of a marker with respect to the imaging device.
Note that types of augmented reality technique to which the present disclosure is applied are not limited. The present disclosure can be applied to, for example, a type of augmented reality technique of displaying a composite image in which a virtual space image is combined with a captured image, to thereby enable a user to view the image of the virtual space superimposed on the real space. The present disclosure can also be applied to, for example, a type of augmented reality technique (such as head-up display (HUD)) of projecting a virtual space image in the field of view of a user, to thereby enable the user to view the image of the virtual space superimposed on the real space.
Further, in the case where the captured image acquired by the captured image acquiring unit is a reversed image, the image generating unit may generate an image of the virtual space including a reversed image of the virtual object
In this way, the directions of the captured image and the image of the virtual space in the displayed image can be made coincident with each other, and a feeling of strangeness given to the user can be reduced.
Further, the captured image acquiring unit may acquire an image reversed by the imaging device, to thereby acquire a reversed image of the captured image, and the captured image acquiring unit may acquire the captured image that is outputted from the imaging device and is then subjected to a reverse process by software processing, to thereby acquire a reversed image of the captured image.
Further, the present disclosure can be interpreted as an information processing apparatus, an information processing system including one or more information processing apparatuses, a method to be executed by a computer, or a program causing a computer to execute. Further, the present disclosure can also be interpreted as a recording medium that records therein such a program, the recording medium being readable by computers, other apparatuses or machines, and the like. Here, the recording medium readable by the computers and the like refers to a recording medium that can accumulate therein information such as data and a program through an electrical, magnetic, optical, mechanical, or chemical action, and allows the computers and the like to read such information out thereof.